CC = g++
LD = g++
HEAD = ../../include/
CXXFLAGS = -Wall -I $(HEAD) -ggdb
LDFLAGS = -L/usr/lib `sdl-config --cflags --libs` -lm -lSDL_image -lGL -lGLU -lglut -ggdb 
EXE = test_bin
OBJS = main.o importer.o 

all :  $(EXE)

test_bin : $(OBJS)
	$(CC) -o $@ main.o importer.o ../../obj/Vertex3D.o ../../obj/Triangle.o ../../obj/Mesh.o ../../obj/Object3D.o ../../obj/Util.o ../../obj/Scene.o ../../obj/Camera.o $(LDFLAGS) 

$(OBJ)%.o : $(SRC)%.cpp
	$(CC) $(CXXFLAGS) -c $^ -o $@

clean :
	@echo Cleaning ...
	@rm -rf *.o $(EXE) 
	@echo Done!
